<?
	if (!defined('i-Teck_ADMIN')) die("Hacking attempt");

	switch($mod){
		case "edit":
		$result=mysql_query("SELECT * FROM shop_config where id=1");	
		while($r=mysql_fetch_array($result)){
		?>
	
<form id="form1" name="form1" method="post">	
		<article class="module width_full">
			<header><h3>Liên hệ</h3></header>
				<div class="module_content">
					<fieldset>
							<label>Thông tin liên hệ</label>
							<textarea name="intro2" cols="50" rows="10" id="intro2"><?=stripslashes($r['intro2']);?></textarea>
							<script language="javascript1.2">generate_wysiwyg('intro2');</script>
					</fieldset>
						
					<input type="submit" name="cmd" id="cmd" value="Sửa" class="alt_btn">
				</div>
		</article><!-- end of styles article -->
  <? }?>
</form>
<?
if($_POST["cmd"]=="Sửa"){ 
		mysql_query("UPDATE shop_config SET  
					intro2='".addslashes($_POST['intro2'])."' WHERE id=1");
		mysql_close();
		echo "<meta http-equiv='refresh' content='0; url=?act=lienhe&mod=ok'>";
	}

	break; 
	case"ok":
		echo"<center>Đã sửa xong!</center>
		<script>setTimeout(\"window.location='?act=lienhe&mod=edit';\", 1000);</script></center>";
	break;
	

}?>
